package com.gome.transactiontree.sample.case2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gome.transactiontree.api.TransactionNode;

public class Remote1Impl implements Remote1 {
	
	private static final Logger LOG = LoggerFactory.getLogger(Remote1Impl.class);
	
	@TransactionNode(commit = "r1_confirm", rollback = "r1_cannel")
	public String r1(String txid, String p2) {
		LOG.info("TCC Remote1Impl.r1({},{})", txid, p2);
		
		return txid;
	}

	public void r1_confirm(String txid, String p2) {
		LOG.info("TCC Remote1Impl.r1_confirm({})", txid);
	}
	
	public void r1_cannel(String txid, String p2) {
		LOG.info("TCC Remote1Impl.r1_cannel({},{})", txid, p2);
	}
}